<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--jstl을 쓰기 위해 사용 --%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--숫자 포맷을 사용하기 위해 사용 --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%><%--함수들을 이용하기 위해 사용 --%>
<%@ taglib prefix="c-rt" uri="http://java.sun.com/jstl/core_rt" %>  <%-- ie버전 확인에 쓰기 위해 씀 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<%--<link type="text/css" href="css/jquery-ui-1.8.13.custom.css" rel="stylesheet" />	
<script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script> 
--%>
<script type="text/javascript">  
//텝 메뉴 실행
$(function(){
	$( "#tabs" ).tabs(); 
}); 

//onclick시 이동관련
$(function(){
$('ul.tab-menu li a').click(function() {
    //alert($(this).attr('href'));
    location.href=$(this).attr('href');
});
}
); 
</script>  
<!--<script type="text/javascript" src="script/sms_riskI_script.js"></script>-->
</head>
<body>
<div class="box1">
  <div id="tabs">

       <ul class="tab-menu">

           <li><a href="#tabs-1" class="t1">자산유형</a></li>

           <li><a href="#tabs-2" class="t2">위협유형</a></li>

           <li><a href="#tabs-3" class="t3 ">취약성유형</a></li>

       </ul>

<div id="tabs-1" style="display:none">
      		<h4 class="white">
      			<span class="align-left">자산유형목록</span>
	      		<span class="align-right">마감상태(정보식별및평가) :
		      		<c:choose>
		      			<c:when test="${sessionScope.magamSession[0].state =='Y'}">
		      				 마감
		      			</c:when>
		      			<c:otherwise>
		      				 착수
		      			</c:otherwise>
		      		</c:choose>
	      		</span>
      		</h4>
        <div class="box-container1">     		
        <form name="riskIDelForm" action="riskIAction.do" method="post">
        	<input type="hidden" name="mode" value="baseA_delete"></input>
        	<input type="hidden" name="pro_id"  id="pro_id" value="${sessionScope.lastProId }"></input>
        	<table class="table-long">
      			<tfoot>
      				<tr>
      					<td>
      					<div class="align-left"><a href="#" class="button1 firstButton"><span style="font-size: small; font-weight:normal;">전체 : ${fn:length(list)}</span></a></div>
      					<div class="align-right"><!--select class="form-select"><option value="option1">Bulk Options</option>
      					<option value="option2">Delete All</option></select>
      					<a href="#" class="button" onclick="javascript: riskIWritePage('makind_insertPage')"><span>작성</span></a>
      					-->
      						<c:choose>
	                       		<c:when test="${sessionScope.magamSession[0].state !='Y'}">
	                       		<!-- 마감 현황이 유무 판별(Y 시 입력 불가) -->
	                       			<a href="#" class="button" onclick="javascript: riskIWritePage('baseA_insertPage')"><span>추가</span></a>
      								<a href="#" class="button lastButton" onclick="javascript: riskIDelete()"><span>삭제</span></a>
	                       		</c:when>
	                       		<c:otherwise>
	                       			<a href="#" class="button1 addMargin" onclick="return false;"><span>추가</span></a>
      								<a href="#" class="button1 lastButton addMargin" onclick="return false;"><span>삭제</span></a>
	                       		</c:otherwise>
	                       	</c:choose>
      					
      					
      					
      					</div></td>
      				</tr>
      				<tr><td class="spaceLine"></td></tr>
      			</tfoot>
      		</table>
      		<table class="table-long">
      			<colgroup>
					<col width="55px"/>
					<col width="115px"/>
					<col width="155px"/>
					<col width="85px"/>
					<col width="85px"/>
					<col/>
					<col width="15px"/>
				</colgroup>
      			<thead>
      				<tr>
      					<td class="col-chk">
      						<input type='checkbox' name='checkAll' onclick="javascript: selectAll()" class="chkCursor"></input>
      					</td>
      					<td>유형명</td>
      					<td>자산유형</td>
      					<td>단축이름</td>
      					<td>자산유형코드</td>
      					<td>분류기준</td>
      					<td></td>
      				</tr>
      			</thead>
      		</table>
      		<div class="scrollDIV" style="height: 470px;">
      		<table class="table-long">
      			<colgroup>
					<col width="55px"/>
					<col width="115px"/>
					<col width="155px"/>
					<col width="85px"/>
					<col width="85px"/>
					<col/>
					<col width="15px"/>
				</colgroup>
      			<tbody>
      				<c:choose>
                    	<c:when test="${fn:length(list)!= 0}">
                       	<c:forEach var="list" items="${requestScope.list}" varStatus="status">
	                    			<%--
	                    			<tr onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');" class="odd">
	                    			 --%>
	                    	 <tr <c:if test="${status.index%2==0 }">class="odd"</c:if> onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');">
                    			<td class="col-chk"><input type="checkbox" name="check" id="check00${status.index+1 }"  class="chkCursor" value='${list.base_lev2cd}'></input></td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.base_lev1 }">${list.base_lev1 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;">
                    					<a href="riskIAction.do?mode=baseA_updatePage&base_lev2cd=${list.base_lev2cd }" class="nor ellipsis" title='${list.base_lev2 }'>${list.base_lev2 }</a>
                    				</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.cutName }">${list.cutName }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.base_lev2cd }">${list.base_lev2cd }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.base_lev3 }">${list.base_lev3 }</div>
                    			</td>
	   					 	<td></td>
                    		</tr>
	                    		
                    	</c:forEach>
                    	</c:when>
                    	<c:otherwise>
                    		<tr class="odd">
								<td colspan="7" class="noDataTD">-데이터가 없습니다-</td>
							</tr>
                    	</c:otherwise>
                    	</c:choose>
      			</tbody>
      		</table>  	
      		</div>
      		</form>
      	</div><!-- end of div.box-container1 -->
      	
      	</div>
      	<div id="tabs-2" style="display:none">
      		<h4 class="white">
      			<span class="align-left">위협목록</span>
	      		<span class="align-right">마감상태(정보식별및평가) :
		      		<c:choose>
		      			<c:when test="${sessionScope.magamSession[2].state =='Y'}">
		      				 마감
		      			</c:when>
		      			<c:otherwise>
		      				 착수
		      			</c:otherwise>
		      		</c:choose>
	      		</span>
      		</h4>
        <div class="box-container1">     		
        <form name="riskIDelForm1" action="riskIAction.do" method="post">
        	<input type="hidden" name="mode" value="baseT_delete"></input>
        	<input type="hidden" name="pro_id"  id="pro_id" value="${sessionScope.lastProId }"></input>
        	<input type="hidden" name="reloadPageName" value="#tabs-2"></input>
        	<table class="table-long">
      			<tfoot>
      				<tr>
      					<td>
      					<div class="align-left"><a href="#" class="button1 firstButton"><span style="font-size: small; font-weight:normal;">전체 : ${fn:length(tlist)}</span></a></div>
      					<div class="align-right"><!--select class="form-select"><option value="option1">Bulk Options</option>
      					<option value="option2">Delete All</option></select>
      					<a href="#" class="button" onclick="javascript: riskIWritePage('makind_insertPage')"><span>작성</span></a>
      					-->
      					
      					
      						<c:choose>
	                       		<c:when test="${sessionScope.magamSession[2].state !='Y'}">
	                       		<!-- 마감 현황이 유무 판별(Y 시 입력 불가) -->
	                       			<a href="#" class="button" onclick="javascript: riskIWritePage('baseT_insertPage')"><span>추가</span></a>
      								<a href="#" class="button lastButton" onclick="javascript: riskIDelete1()"><span>삭제</span></a>
	                       		</c:when>
	                       		<c:otherwise>
	                       			<a href="#" class="button1 addMargin" onclick="return false;"><span>추가</span></a>
      								<a href="#" class="button1 lastButton addMargin" onclick="return false;"><span>삭제</span></a>
	                       		</c:otherwise>
	                       	</c:choose>
      					</div></td>
      				</tr>
      				<tr><td class="spaceLine"></td></tr>
      			</tfoot>
      		</table>
      		<table class="table-long">
      			<colgroup>
					<col width="55px"/>
					<col width="80px"/>
					<col width="120px"/>
					<col width="80px"/>
					<col width="150px"/>
					<col width="80px"/>
					<col/>
					<col width="15px"/>
				</colgroup>
      			<thead>
      				<tr>
      					<td class="col-chk">
      						<input type='checkbox' name='checkAll1' onclick="javascript: selectAll1()"  class="chkCursor"></input>
      					</td>
      					<td>위협유형코드</td>
      					<td>위협유형</td>
      					<td>위협코드</td>
      					<td>위협명</td>
      					<td>상세위협코드</td>
      					<td>상세위협명</td>
      					<td></td>
      				</tr>
      			</thead>
      		</table>
      		<div class="scrollDIV" style="height: 470px;">
      		<table class="table-long">
      			<colgroup>
					<col width="55px"/>
					<col width="80px"/>
					<col width="120px"/>
					<col width="80px"/>
					<col width="150px"/>
					<col width="80px"/>
					<col/>
					<col width="15px"/>
				</colgroup>
      			<tbody>
      				<c:choose>
                    	<c:when test="${fn:length(tlist)!= 0}">
                       	<c:forEach var="list" items="${requestScope.tlist}" varStatus="status">
	                    			<%--
	                    			<tr onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');" class="odd">
	                    			 --%>
	                    	 <tr <c:if test="${status.index%2==0 }">class="odd"</c:if> onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');">
                    			<td class="col-chk"><input type="checkbox" name="check1" id="check10${status.index+1 }"  class="chkCursor" value='${list.base_lev1}${list.base_lev2}${list.base_lev3}'></input></td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.base_lev1 }">${list.base_lev1 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.tk_nm1 }">${list.tk_nm1 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.base_lev2 }">${list.base_lev2 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;">
                    					<a href="riskIAction.do?mode=baseT_updatePage&base_levAll=${list.base_lev1}${list.base_lev2}${list.base_lev3}" class="nor ellipsis" title='${list.tk_nm2 }'>${list.tk_nm2 }</a>
                    				</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.base_lev3 }">${list.base_lev3 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.tk_nm3 }">${list.tk_nm3 }</div>
                    			</td>
	   					 	<td></td>
                    		</tr>
	                    		
                    	</c:forEach>
                    	</c:when>
                    	<c:otherwise>
                    		<tr class="odd">
								<td colspan="8" class="noDataTD">-데이터가 없습니다-</td>
							</tr>
                    	</c:otherwise>
                    	</c:choose>
      			</tbody>
      		</table>  	
      		</div>
      		</form>
      	</div><!-- end of div.box-container1 -->
      	
      	</div>
      	<div id="tabs-3" style="display:none">
      		<h4 class="white">
      			<span class="align-left">취약성유형</span>
	      		<span class="align-right">마감상태(정보식별및평가) :
		      		<c:choose>
		      			<c:when test="${sessionScope.magamSession[2].state =='Y'}">
		      				 마감
		      			</c:when>
		      			<c:otherwise>
		      				 착수
		      			</c:otherwise>
		      		</c:choose>
	      		</span>
      		</h4>

        <div class="box-container1">     		
        <form name="riskIDelForm2" action="riskIAction.do" method="post">
        	<input type="hidden" name="mode" value="baseV_delete"></input>
        	<input type="hidden" name="pro_id"  id="pro_id" value="${sessionScope.lastProId }"></input>
        	<input type="hidden" name="reloadPageName" value="#tabs-3"></input>
        	<table class="table-long">
      			<tfoot>
      				<tr>
      					<td>
      					<div class="align-left"><a href="#" class="button1 firstButton"><span style="font-size: small; font-weight:normal;">전체 : ${fn:length(vlist)}</span></a></div>
      					<div class="align-right"><!--select class="form-select"><option value="option1">Bulk Options</option>
      					<option value="option2">Delete All</option></select>
      					<a href="#" class="button" onclick="javascript: riskIWritePage('makind_insertPage')"><span>작성</span></a>
      					-->
      						<c:choose>
	                       		<c:when test="${sessionScope.magamSession[2].state !='Y'}">
	                       		<!-- 마감 현황이 유무 판별(Y 시 입력 불가) -->
	                       			<a href="#" class="button" onclick="javascript: riskIWritePage('baseV_insertPage')"><span>추가</span></a>
      								<a href="#" class="button lastButton" onclick="javascript: riskIDelete2()"><span>삭제</span></a>
	                       		</c:when>
	                       		<c:otherwise>
	                       			<a href="#" class="button1 addMargin" onclick="return false;"><span>추가</span></a>
      								<a href="#" class="button1 lastButton addMargin" onclick="return false;"><span>삭제</span></a>
	                       		</c:otherwise>
	                       	</c:choose>
      					
      					</div></td>
      				</tr>
      				<tr><td class="spaceLine"></td></tr>
      			</tfoot>
      		</table>
      		<table class="table-long">
      			<colgroup>
					<col width="40px"/>
					<col width="60px"/>
					<col width="80px"/>
					<col width="60px"/>
					<col width="80px"/>
					<col width="60px"/>
					<col width="80px"/>
					<col width="60px"/>
					<col width="80px"/>
					<col/>
					<col width="15px"/>
				</colgroup>
      			<thead>
      				<tr>
      					<td class="col-chk">
      						<input type='checkbox' name='checkAll2' onclick="javascript: selectAll2()" class="chkCursor"></input>
      					</td>
      					<td class=" col-rowspanMid">코드</td>
      					<td class=" col-rowspanMid">&nbsp;&nbsp;&nbsp;통제구분</td>
      					<td class=" col-rowspanMid">코드</td>
      					<td class=" col-rowspanMid">&nbsp;&nbsp;&nbsp;통제영역</td>
      					<td class=" col-rowspanMid">코드</td>
      					<td class=" col-rowspanMid">&nbsp;&nbsp;&nbsp;통제항목</td>
      					<td class=" col-rowspanMid">코드</td>
      					<td class=" col-rowspanMid">&nbsp;&nbsp;&nbsp;통제<br/>&nbsp;&nbsp;&nbsp;세부항목</td>
      					<td class=" col-rowspanMid">취약성명</td>
      					<td></td>
      				</tr>
      			</thead>
      		</table>
      		<div class="scrollDIV" style="height: 460px;">
      		<table class="table-long">
      			<colgroup>
					<col width="40px"/>
					<col width="60px"/>
					<col width="80px"/>
					<col width="60px"/>
					<col width="80px"/>
					<col width="60px"/>
					<col width="80px"/>
					<col width="60px"/>
					<col width="80px"/>
					<col/>
					<col width="15px"/>
				</colgroup>
      			<tbody>
      				<c:choose>
                    	<c:when test="${fn:length(vlist)!= 0}">
                       	<c:forEach var="list" items="${requestScope.vlist}" varStatus="status">
	                    			<%--
	                    			<tr onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');" class="odd">
	                    			 --%>
	                    	 <tr <c:if test="${status.index%2==0 }">class="odd"</c:if> onmouseover="ChangeBackground(this,'over','${status.index}');" onmouseout="ChangeBackground(this,'out','${status.index}');">
                    			<td class="col-chk"><input type="checkbox" name="check2" id="check20${status.index+1 }"  class="chkCursor" value='${list.ts_cd1}${list.ts_cd2}${list.ts_cd3}${list.ts_cd4}'></input></td>
                    			<td style="padding-left: 15px">
                    				<div class="ellipsis"  style="width:100%;" title="${list.ts_cd1 }">${list.ts_cd1 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;">
                    					<a href="riskIAction.do?mode=baseV_updatePage&ts_cdAll=${list.ts_cd1}${list.ts_cd2}${list.ts_cd3}${list.ts_cd4}" class="nor ellipsis" title='${list.ts_nm1 }'>${list.ts_nm1 }</a>
                    				</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.ts_cd2 }">${list.ts_cd2 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;">
                    					<a href="riskIAction.do?mode=baseV_updatePage&ts_cdAll=${list.ts_cd1}${list.ts_cd2}${list.ts_cd3}${list.ts_cd4}" class="nor ellipsis" title='${list.ts_nm2 }'>${list.ts_nm2 }</a>
                    				</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.ts_cd3 }">${list.ts_cd3 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;">
                    					<a href="riskIAction.do?mode=baseV_updatePage&ts_cdAll=${list.ts_cd1}${list.ts_cd2}${list.ts_cd3}${list.ts_cd4}" class="nor ellipsis" title='${list.ts_nm3 }'>${list.ts_nm3 }</a>
                    				</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.ts_cd4 }">${list.ts_cd4 }</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;">
                    					<a href="riskIAction.do?mode=baseV_updatePage&ts_cdAll=${list.ts_cd1}${list.ts_cd2}${list.ts_cd3}${list.ts_cd4}" class="nor ellipsis" title='${list.ts_nm4 }'>${list.ts_nm4 }</a>
                    				</div>
                    			</td>
                    			<td>
                    				<div class="ellipsis"  style="width:100%;" title="${list.v_nm }">${list.v_nm }</div>
                    			</td>
	   					 	<td></td>
                    		</tr>
	                    		
                    	</c:forEach>
                    	</c:when>
                    	<c:otherwise>
                    		<tr class="odd">
								<td colspan="11" class="noDataTD">-데이터가 없습니다-</td>
							</tr>
                    	</c:otherwise>
                    	</c:choose>
      			</tbody>
      		</table>  	
      		</div>
      		</form>
      	</div><!-- end of div.box-container1 -->

</div>
      	
      	</div>
      	</div> <!-- end of div.box -->
</body>
</html>